package com.xinfu.mooddiaryjava.ui.page;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView;

import com.kunminx.architecture.ui.adapter.SimpleBaseBindingAdapter;
import com.xinfu.mooddiaryjava.R;
import com.xinfu.mooddiaryjava.bridge.state.ContentListViewModel;
import com.xinfu.mooddiaryjava.bridge.state.ContentViewModel;
import com.xinfu.mooddiaryjava.data.bean.StateBean;
import com.xinfu.mooddiaryjava.databinding.FragmentContentBinding;
import com.xinfu.mooddiaryjava.ui.base.BaseFragment;

import java.util.ArrayList;
import java.util.List;

public class ContentFragment extends BaseFragment {

    private ContentViewModel mViewModel;
    private FragmentContentBinding mBinding;
    private Fragment fragment;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mViewModel = getFragmentViewModelProvider(this).get(ContentViewModel.class);
    }

    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
                             @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_content, container, false);
        mBinding = FragmentContentBinding.bind(view);
        mBinding.setVm(mViewModel);
        mBinding.setClick(new ClickProxy());
        return view;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);


    }

    public class ClickProxy{
        public void back(){
            nav().navigateUp();
        }
    }

}
